using System;
using System.Drawing;
using System.Windows.Forms;
using ErkerTech.DeltaScope.App.Views;

namespace ErkerTech.DeltaScope.App.Models
{
    public class DeltaScopeApp
    {
        private static Font _swirlFont;
        private static bool _wordWrap;
        private static bool _swirlRegionVisible;

        public delegate void SwirlFontChangedHandler(object sender, EventArgs e);
        public static event SwirlFontChangedHandler SwirlFontChanged;
        public delegate void WordWrapChangedHandler(object sender, EventArgs e);
        public static event WordWrapChangedHandler WordWrapChanged;
        public delegate void SwirlRegionVisibleChangedHandler(object sender, EventArgs e);
        public static event SwirlRegionVisibleChangedHandler SwirlRegionVisibleChanged;

        static DeltaScopeApp()
        {
           // MainScreen = new MainForm();			
            Engine = new DeltaScopeEngine();
            _swirlFont = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));// MainScreen.Font;
        }

        #region Public Static Properties
        public static DeltaScopeEngine Engine { get; private set; }
       // public static MainForm MainScreen { get; private set; }

        public static bool SwirlRegionVisible
        {
            get {return _swirlRegionVisible;}
            set
            {
                if (_swirlRegionVisible == value) return;
                _swirlRegionVisible = value;
                if ( SwirlRegionVisibleChanged != null) SwirlRegionVisibleChanged(new object(), new EventArgs());
            }
        }
        public static Font SwirlFont
        {
            get {return _swirlFont;}
            set 
            {
                if (_swirlFont == value) return;
                _swirlFont = value;
                if(SwirlFontChanged!=null) SwirlFontChanged(new object(), new EventArgs());
            }
        }
        public static bool WordWrap
        {
            get {return _wordWrap;}
            set
            {
                if (_wordWrap == value) return;
                _wordWrap = value;
                if(WordWrapChanged!=null) WordWrapChanged(new object(), new EventArgs());
            }
        }		
        #endregion
	/*
        #region Application Start Point
        [STAThread]
        static void Main() 
        {	
            Application.EnableVisualStyles();
            Application.Run(MainScreen);
        }
        #endregion
     * */
    }
}